package school.dao;

import java.util.List;

import school.entity.ExamResult;
import school.entity.Student;
import util.DBUtil;

public class UTiTest {

	public static void main(String[] args) {
		String sql = "select id,st_id,sb_id,exam_date as examDate,score from examresult where score>=?";

		List<ExamResult> list = DBUtil.query(sql, ExamResult.class, 60);
		for (ExamResult e : list) {
			System.out.println(e);
		}
		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
		sql = "select sname,stuno,fromcity from student where sname like ?";
		List<Student> list2 = DBUtil.query(sql, Student.class, "%王%");
		for (Student s : list2) {
			System.out.println(s);
		}
	}
}
